﻿using GodSystemDAL;
using GodSystemModel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GodSystemBLL
{
    public class ProductsBLL
    {
        private static ProductsDAL productsDAL = new ProductsDAL();
        public object CheckProductSn(string productSn)
        {
            ProductsModel productsModel = new ProductsModel();
            productsModel.ProductSn = productSn;
            return productsDAL.CheckProductSn(productsModel);
        }


        public int AddProduct(ProductsModel products)
        {
            return productsDAL.AddProduct(products);
        }


        public DataTable GetProductsList(int currentPage, int pageSize = 4, ProductsModel productsModel = null)
        {
            DataTable dr = productsDAL.GetProductsList(currentPage, pageSize, productsModel);
            return dr;

        }
    }
}
